﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="NewProperty.aspx.cs" Inherits="LizzabethBrownRealEstate.Views.Admin.NewProperty" %>
<%@ Import Namespace="LizzabethBrownRealEstate.Controllers" %>
<%@ Import Namespace="LizzabethBrownRealEstate.Models" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <form method="post" action="<%= Url.Action("SaveOrUpdateProperty", "Admin", new {propertyId=0}) %>">
        <div class="contentDiv" style="margin-left:20%; margin-top:25px">
            <fieldset id="fldRegister" style="width:450px;margin-bottom: 20px; ">
                <legend>New Property</legend>
                <table>
                    <tr class="addPropertyRow">
                        <td class="addPropertyLabel"><label class="label" for="txtUserName">Location:&nbsp;</label></td>
                        <td class="addPropertyField"><% LBRDataContext dc = new LBRDataContext();  %><%= Html.DropDownList("Select...", "Location", new SelectList(dc.Locations, "LocationId", "Name")) %></td>
                    </tr>
                    <tr class="addPropertyRow">
                        <td class="addPropertyLabel"><label class="label" for="txtPassword"># of Bathrooms:&nbsp;</label></td>
                        <td class="addPropertyField"><input type="text" id="txtBathrooms" name="Bathrooms" maxlength="2" size="5" /></td>
                    </tr>
                    <tr class="addPropertyRow">
                        <td class="addPropertyLabel"><label class="label" for="txtPassword"># of Bedrooms:&nbsp;</label></td>
                        <td class="addPropertyField"><input type="text" id="txtBedrooms" name="Bedrooms" maxlength="2" size="5" /></td>
                    </tr>
                    <tr class="addPropertyRow">
                        <td class="addPropertyLabel"><label class="label" for="txtFirst"># of Fireplaces:&nbsp;</label></td>
                        <td class="addPropertyField"><input type="text" id="txtFireplaces" name="Fireplaces" maxlength="2" size="5" /></td>
                    </tr>
                    <tr class="addPropertyRow">
                        <td class="addPropertyLabel"><label class="label" for="txtLastName"># of Full Baths:&nbsp;</label></td>
                        <td class="addPropertyField"><input type="text" id="txtBaths" name="FullBaths" maxlength="2" size="5" /></td>
                    </tr>
                    <tr class="addPropertyRow">
                        <td class="addPropertyLabel"><label class="label" for="txtPhone"># of Rooms:&nbsp;</label></td>
                        <td class="addPropertyField"><input type="text" id="txtRooms" name="Rooms" maxlength="20" size="2" /></td>
                    </tr>
                    <tr class="addPropertyRow">
                        <td class="addPropertyLabel"><label class="label" for="txtEmail">Total Living Area:&nbsp;</label></td>
                        <td class="addPropertyField"><input type="text" id="txtTotArea" name="TotalLivingArea" maxlength="15" size="10" /></td>
                    </tr>
                    <tr class="addPropertyRow">
                        <td class="addPropertyLabel"><label class="label" for="txtEmail">Total Square Feet:&nbsp;</label></td>    
                        <td class="addPropertyField"><input type="text" id="txtTotSqrFeet" name="TotalSquareFeet" maxlength="15" size="10" /></td>                    
                    </tr>
                    <tr class="addPropertyRow">
                        <td class="addPropertyLabel"><label class="label" for="txtEmail">Has Basement?:&nbsp;</label></td>
                        <td class="addPropertyField"><%= Html.CheckBox("Basement", false)%></td>
                    </tr>
                    <tr class="addPropertyRow">
                        <td class="addPropertyLabel"><label class="label" for="txtEmail">New Contstruction?:&nbsp;</label></td>
                        <td class="addPropertyField"><%= Html.CheckBox("NewConstruction", false) %></td>
                    </tr>
                    <tr class="addPropertyRow">
                        <td class="addPropertyLabel"><label class="label" for="txtEmail">Price:&nbsp;</label></td>
                        <td class="addPropertyField"><input type="text" id="txtPrice" name="Price" maxlength="15" size="20" /></td>
                    </tr>
                    <tr class="addPropertyRow">
                        <td class="addPropertyLabel"><label class="label" for="txtEmail">Description:&nbsp;</label></td>
                        <td class="addPropertyField"><input type="text" id="txtDescription" name="Description" maxlength="150" size="20" /></td>
                    </tr>
                    <tr class="addPropertyRow">
                        <td class="addPropertyLabel"><label class="label" for="txtEmail">Upload Image:&nbsp;</label></td>
                        <td class="addPropertyField"><input type="file" id="txtImg" name="Filename" size="30"  /></td>
                    </tr>
                </table>
            </fieldset>
            <div style="margin-top: 20px; ">
                <input type="submit" id="btnSubmit" value="Add Property" />
                <button onclick = "window.location ='../Admin.ashx/AdminOptions'; return false;">Cancel</button>
            </div>
        </div>
    </form>
</asp:Content>
